from selenium.webdriver.common.by import By

class AdminPURoleLocator:
        paltform_user_tab = (By.XPATH, "//div[contains(@data-menu-id,'MANAGEMENT_PLT_PLATFORM_USER')]/span/div")

        # role菜单
        role_tab = (By.XPATH, "//li[contains(@data-menu-id,'ROLE_LANDINGPAGE')]/span/div")

        # role_name
        # role_name = (By.XPATH, "//span[contains(@class,'tableName')]")
        role_name = (By.XPATH, "//tr[contains(@class, 'antd4-table-row')]/td[1]")

        # role_name搜索框
        role_name_search_input = (By.CSS_SELECTOR, '[placeholder="Role Name"]')

        # role_name搜索button
        role_name_search_button = (By.XPATH, "//button[contains(@class,'nput-search-button')]")

        # create_role_btn
        create_role_button = (By.XPATH, "//button[contains(@class,'buttonLeft')]")

        # create_name_input
        create_role_name = (By.ID, 'creForm_roleName')

        # creat_next_button创建下一步按钮
        creat_next_button = (By.XPATH, "//button[contains(@class,'config-theme-system-user-primary-button')]")

        # 创建角色成功
        add_success_prompt = (By.CSS_SELECTOR, '[class="anticon anticon-check-circle"]')

        # 角色操作按钮
        role_operation_button = (By.XPATH, "//span[contains(@class,'table-operation-ellipsis')]")

        # role_delete角色删除按钮
        role_delete = (By.XPATH, "(//li[contains(@class,'dropdown-menu-item-only-child')])[2]/span")

        # role_preission_edit角色编辑按钮
        role_permission_edit = (By.XPATH, "(//li[contains(@class,'dropdown-menu-item-only-child')])[1]")

        role_permission_edit_span = (By.XPATH, "(//li[contains(@class,'dropdown-menu-item-only-child')])[1]/span")

        # 删除数据确认按钮
        role_I_acknowledge = (By.CSS_SELECTOR, '[class="antd4-checkbox"]')

        # 确认删除按钮
        role_ok_confirm = (By.XPATH, "(//button[contains(@class,'config-theme-system-user-primary-button')])[2]")

        # 编辑按钮
        role_edit = (By.XPATH, "//button[contains(@class,'table-operation-btnLine-btn')]")

        # 编辑框清空内容按钮
        edit_clear_input = (By.XPATH, "//span[contains(@class,'anticon-close-circle')]")

        # 编辑框角色名称
        edit_role_name = (By.CSS_SELECTOR, '[id="creForm_modifyRoleName"]')

        # 编辑角色的权限bill
        bill_permission = (By.XPATH, '(//span[@class="antd4-tree-checkbox-inner"])[3]')

        # 编辑角色权限confirm按钮
        bill_permission_edit_next = (By.XPATH, "//button[contains(@class,'nextButton')]")

        # overviewtab
        overview_tab = (By.ID, "rc-tabs-0-tab-1")

        # role_permission_tab
        role_permission_tab = (By.ID, "rc-tabs-0-tab-2")

        # 返回role页面
        back_to_role_page = (By.XPATH, "(//span[contains(@class,'breadcrumb-link')])[1]")

        # spending_summary
        spending_summary = (By.XPATH, '(//span[@class="antd4-tree-checkbox-inner"])[5]')

        # spending_summary_tab
        spending_summary_tab = (By.CSS_SELECTOR, '[path="/work_bench/bills"]')

        # order_management
        order_management = (By.XPATH, '(//span[@class="antd4-tree-checkbox-inner"])[8]')

        # order_management
        order_management_tab = (By.XPATH, "//div[contains(@data-menu-id,'ORDER_CST')]")

        # 加载转菊花
        loading_wait = (By.CSS_SELECTOR, '[class="antd4-spin-dot antd4-spin-dot-spin"]')

        #basic_information_button
        basic_information_button=(By.XPATH,"//button[contains(@class,'system-user-common-border-button')]")

        # 翻页
        page_total = (By.CSS_SELECTOR, '[class="antd4-pagination-total-text"]')

        # edit_role_header
        edit_role_header = (By.XPATH, "//div[contains(@class,'headerGroup')]/div")

        # query_result_element
        query_result_element = (By.CSS_SELECTOR, '[class="antd4-table-row antd4-table-row-level-0"]')

        # 列表字段
        list_columns = (By.CSS_SELECTOR, "tr th.antd4-table-cell")


